<?php include_once 'layout/heard.php'?>

<body style="background:#f5f5f5; padding-bottom:45px;">

<div class="content head_bg">
	<div class="head">
        <a href="javascript:void(0)" class="return_ico" onclick="javascript:history.go(-1);"><span></span></a>
        <h1>订单详情</h1>
    </div>
</div>


<div class="content order_xx_top">
    <div class="com">
        <div class="mdxx">
            <h3><?php echo $orderExpressInfo['shopInfo']['storename'] ?></h3>
            <p><?php echo $orderExpressInfo['shopInfo']['address'] ?></p>
            <a href="tel:<?php echo $orderExpressInfo['shopInfo']['tel'] ?>"></a>
        </div>
        <div class="shrxx">
            <h3><?php echo $orderExpressInfo['orderInfo']['receiver'] ?></h3>
            <p><?php echo $orderExpressInfo['orderInfo']['receiver_address'] ?></p>
            <a href="tel:<?php echo $orderExpressInfo['orderInfo']['receiver_tel'] ?>"></a>
            <p><?php echo '配送距离：'. round($orderExpressInfo['orderInfo']['distance']/1000,2).'公里';  ?></p>
        </div>
    </div>
</div>
<div class="content order_xx_com">
    <ul>
        <li>
            <p>最迟到店</p>
            <span><?php echo $orderExpressInfo[0]['shop_pickup_time'] ?> 前取货</span>
        </li>
        <li>
            <p>最迟送达</p>
            <span><?php echo $orderExpressInfo[0]['shop_delivery_time'] ?> 前送达</span>
        </li>
        <li>
            <p>订单收入</p>
            <b>￥ <?php echo $orderExpressInfo[0]['express_fee'] ?></b>
        </li>

        <?php

        if($orderExpressInfo[0]['tip_arr'] && count($orderExpressInfo[0]['tip_arr']) > 0){
            if(count($orderExpressInfo[0]['tip_arr']) > 1){
                $c = '($k+1)';
            }else{
                $c = '';
            }
            foreach($orderExpressInfo[0]['tip_arr'] as $k=>$tip){
                $tip_remark .= isset($tip['tip_remark']) ? $c.' '.$tip['tip_remark'] :''.' ';
                echo '<li>
                    <p>配送小费</p>
                    <b>￥ '.$tip['price'].'</b>
                </li>';

                echo '<li>
                    <p>配送小费备注</p>
                    <b>'.$tip_remark.'</b>
                </li>';
            }
        }
        ?>

        <li>
            <p>指派备注</p>
            <b> <?php echo $orderExpressInfo[0]['shop_express_remark'] ?></b>
        </li>
    </ul>
</div>

<div class="content order_xx_com">
    <ul>
        <li><p style="color:#333; font-weight:bold">商品信息：</p></li>
        <?php foreach($orderExpressInfo['orderProductInfo'] as $op){
            echo ' <li><p>'.$op['product_name'].'</p><span>× '.$op['qty'].'</span></li>	';
        }?>



        <li>
            <p>共计：</p>
            <span><?php echo count($orderExpressInfo['orderProductInfo'])?>件</span>
        </li>
    </ul>
</div>

<div class="order_xx_bnt">
	<div class="content">
    	<a class="bnt_wfps" href="javascript:void(0)">无法配送</a>
        <a class="bnt_right bnt_qrqh" code="<?php echo $orderExpressInfo[0]['id'] ?>"  href="javascript:void(0)">确认取货</a>
    </div>
</div>

<div class="group_tc_bg" id="qrqh_pop">
    <div class="group_tc">
        <h3>温馨提示！</h3>
        <p>请到门店拿到商品确认无误后，再按确认取货，虚假按确认取货将会被平台惩罚哦！</p>
        <div class="bnt">
            <a href="javascript:void(0)" class="btn1">还未到店</a>
            <a href="javascript:void(0)" class="btn2">确认取货</a>
            <p style="display: none" >1</p>
        </div>
    </div>
</div>

<div class="group_tc_bg" id="wfps_pop">
    <div class="group_tc">
        <h3>温馨提示！</h3>
        <p>目前无法自动取消配送订单，只能拨打门店电话，让门店操作取消订单。</p>
        <div class="bnt">
            <a href="javascript:void(0)" class="btn1">继续配送</a>
            <a href="tel:<?php echo $orderExpressInfo['shopInfo']['tel'] ?>" class="btn2">拨打门店电话</a>
        </div>
    </div>
</div>
<?php include_once 'layout/rfooter.php'?>
